//////////////////////////////////////////////////////////////////////////
public:
	/// <summary>
	/// CV_IS_IMAGE_HDR
	/// </summary>
	static bool IS_IMAGE_HDR(IntPtr img)
	{
		void* ptr = img.ToPointer();
		return CV_IS_IMAGE_HDR(ptr);
	}

	/// <summary>
	/// CV_IS_IMAGE
	/// </summary>
	static bool IS_IMAGE(IntPtr img)
	{
		void* ptr = img.ToPointer();
		return CV_IS_IMAGE(ptr);
	}

	///// <summary>
	///// get reference to pixel at (col,row),
	///// for multi-channel images (col) should be multiplied by number of channels
	///// </summary>
	///// <typeparam name="TElemType"></typeparam>
	///// <param name="image"></param>
	///// <param name="row"></param>
	///// <param name="col"></param>
	///// <returns></returns>
	//private: static TElemType CV_IMAGE_ELEM<TElemType>(IntPtr image, int row, int col)
	//{
	//	throw new NotSupportedException();
	//	// return (((elemtype*)((image)->imageData + (image)->widthStep*(row)))[(col)])
	//}

	/// <summary>
	/// CV_MAT_DEPTH
	/// </summary>
	static MatDepth MAT_DEPTH(MatFlag flags)
	{
		return (MatDepth)CV_MAT_DEPTH((int)flags);
	}
	/// <summary>
	/// CV_MAKETYPE
	/// </summary>
	static MatFlag MAKETYPE(MatDepth depth, int cn)
	{
		return (MatFlag)CV_MAKE_TYPE((int)depth, cn);
	}
	/// <summary>
	/// CV_MAKE_TYPE
	/// </summary>
	static MatFlag MAKE_TYPE(MatDepth depth, int cn)
	{
		return (MatFlag)CV_MAKE_TYPE((int)depth, cn);
	}
	/// <summary>
	/// CV_8UC
	/// </summary>
	static MatFlag MAKE_TYPE_8UC(int n) { return (MatFlag)CV_8UC(n); }
	/// <summary>
	/// CV_8SC
	/// </summary>
	static MatFlag MAKE_TYPE_8SC(int n) { return (MatFlag)CV_8SC(n); }
	/// <summary>
	/// CV_16UC
	/// </summary>
	static MatFlag MAKE_TYPE_16UC(int n) { return (MatFlag)CV_16UC(n); }
	/// <summary>
	/// CV_16SC
	/// </summary>
	static MatFlag MAKE_TYPE_16SC(int n) { return (MatFlag)CV_16SC(n); }
	/// <summary>
	/// CV_32SC
	/// </summary>
	static MatFlag MAKE_TYPE_32SC(int n) { return (MatFlag)CV_32SC(n); }
	/// <summary>
	/// CV_32FC
	/// </summary>
	static MatFlag MAKE_TYPE_32FC(int n) { return (MatFlag)CV_32FC(n); }
	/// <summary>
	/// CV_64FC
	/// </summary>
	static MatFlag MAKE_TYPE_64FC(int n) { return (MatFlag)CV_64FC(n); }
	/// <summary>
	/// CV_MAT_CN
	/// </summary>
	static int MAT_CN(MatFlag flags)
	{
		 return (int)CV_MAT_CN((int)flags);
	}
	/// <summary>
	/// CV_MAT_TYPE
	/// </summary>
	static MatFlag MAT_TYPE(MatFlag flags)
	{
		return (MatFlag)CV_MAT_TYPE((int)flags);
	}
	/// <summary>
	/// CV_IS_MAT_CONT
	/// </summary>
	static bool IS_MAT_CONT(MatFlag flags)
	{
		return CV_IS_MAT_CONT((int)flags) != 0;
	}
	/// <summary>
	/// CV_IS_CONT_MAT
	/// </summary>
	static bool IS_CONT_MAT(MatFlag flags)
	{
		return CV_IS_CONT_MAT((int)flags) != 0;
	}
	/// <summary>
	/// CV_IS_TEMP_MAT
	/// </summary>
	static bool IS_TEMP_MAT(MatFlag flags)
	{
		return CV_IS_TEMP_MAT((int)flags) != 0;
	}
	/// <summary>
	/// CV_IS_MAT_HDR
	/// </summary>
	static bool IS_MAT_HDR(IntPtr mat)
	{
		void* ptr = mat.ToPointer();
		return CV_IS_MAT_HDR(ptr);
	}
	/// <summary>
	/// CV_IS_MAT
	/// </summary>
	static bool IS_MAT(IntPtr mat)
	{
		void* ptr = mat.ToPointer();
		return CV_IS_MAT(ptr);
	}
	/// <summary>
	/// CV_IS_MASK_ARR
	/// </summary>
	static bool IS_MASK_ARR(IntPtr mat)
	{
		CvMat* ptr = (CvMat*)mat.ToPointer();
		return CV_IS_MASK_ARR(ptr);
	}
	/// <summary>
	/// CV_ARE_TYPES_EQ
	/// </summary>
	static bool ARE_TYPES_EQ(IntPtr mat1, IntPtr mat2)
	{
		CvMat* ptr1 = (CvMat*)mat1.ToPointer();
		CvMat* ptr2 = (CvMat*)mat2.ToPointer();
		return CV_ARE_TYPES_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_ARE_CNS_EQ
	/// </summary>
	static bool ARE_CNS_EQ(IntPtr mat1, IntPtr mat2)
	{
		CvMat* ptr1 = (CvMat*)mat1.ToPointer();
		CvMat* ptr2 = (CvMat*)mat2.ToPointer();
		return CV_ARE_CNS_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_ARE_DEPTHS_EQ
	/// </summary>
	static bool ARE_DEPTHS_EQ(IntPtr mat1, IntPtr mat2)
	{
		CvMat* ptr1 = (CvMat*)mat1.ToPointer();
		CvMat* ptr2 = (CvMat*)mat2.ToPointer();
		return CV_ARE_DEPTHS_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_ARE_SIZES_EQ
	/// </summary>
	static bool ARE_SIZES_EQ(IntPtr mat1, IntPtr mat2)
	{
		CvMat* ptr1 = (CvMat*)mat1.ToPointer();
		CvMat* ptr2 = (CvMat*)mat2.ToPointer();
		return CV_ARE_SIZES_EQ(ptr1, ptr2);
	}
	/// <summary>
	/// CV_IS_MAT_CONST
	/// </summary>
	static bool IS_MAT_CONST(IntPtr mat)
	{
		CvMat* ptr = (CvMat*)mat.ToPointer();
		return CV_IS_MAT_CONST(ptr);
	}
	/// <summary>
	/// Size of each channel item,
	/// 0x124489 = 1000 0100 0100 0010 0010 0001 0001 ~ array of sizeof(arr_type_elem)
	/// </summary>
	static int ELEM_SIZE1(MatFlag type)
	{
		return CV_ELEM_SIZE1((int)type);
	}
	/// <summary>
	/// 0x3a50 = 11 10 10 01 01 00 00 ~ array of log2(sizeof(arr_type_elem))
	/// </summary>
	static int ELEM_SIZE(MatFlag type)
	{
		return CV_ELEM_SIZE((int)type);
	}
	/// <summary>
	/// CV_MAT_ELEM_PTR_FAST
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <param name="pix_size"></param>
	/// <returns></returns>
	static IntPtr MAT_ELEM_PTR_FAST(IntPtr mat, int row, int col, int pix_size)
	{
		CvMat& ptr = *(CvMat*)mat.ToPointer();
		return IntPtr(CV_MAT_ELEM_PTR_FAST(ptr, row, col, pix_size));
	}
	/// <summary>
	/// CV_MAT_ELEM_PTR
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <returns></returns>
	//template<class T>
	//static IntPtr MAT_ELEM_PTR<T>(IntPtr mat, int row, int col)
	//{
	//	CvMat* ptr = (CvMat*)mat.ToPointer();
	//	return MAT_ELEM_PTR_FAST(mat, row, col, ELEM_SIZE((ptr->type)));
	//}
	/// <summary>
	/// CV_MAT_ELEM
	/// </summary>
	/// <typeparam name="TElem"></typeparam>
	/// <param name="mat"></param>
	/// <param name="row"></param>
	/// <param name="col"></param>
	/// <returns></returns>
	//static TElem CV_MAT_ELEM<TElem>(IntPtr mat, int row, int col)
	//{
	//	throw new NotSupportedException();
	//	//return (*(elemtype*)CV_MAT_ELEM_PTR_FAST( mat, row, col, sizeof(elemtype)))
	//}

	/// <summary>
	/// CV_IS_MATND_HDR
	/// </summary>
	static bool IS_MATND_HDR(IntPtr mat)
	{
		void* ptr = mat.ToPointer();
		return CV_IS_MATND_HDR(ptr);
	}
	/// <summary>
	/// CV_IS_MATND
	/// </summary>
	static bool IS_MATND(IntPtr mat)
	{
		void* ptr = mat.ToPointer();
		return CV_IS_MATND(ptr);
	}

	/// <summary>
	/// CV_IS_SPARSE_MAT_HDR
	/// </summary>
	static bool IS_SPARSE_MAT_HDR(IntPtr mat)
	{
		void* ptr = mat.ToPointer();
		return CV_IS_SPARSE_MAT_HDR(ptr);
	}
	/// <summary>
	/// CV_IS_SPARSE_MAT
	/// </summary>
	static bool IS_SPARSE_MAT(IntPtr mat)
	{
		void* ptr = mat.ToPointer();
		return CV_IS_SPARSE_MAT(ptr);
	}

	/// <summary>
	/// CV_NODE_VAL
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="node"></param>
	/// <returns></returns>
	static IntPtr NODE_VAL(IntPtr mat, IntPtr node)
	{
		CvSparseMat* matPtr = (CvSparseMat*)mat.ToPointer();
		void* nodePtr = node.ToPointer();
		return IntPtr(CV_NODE_VAL(matPtr, nodePtr));
	}
	/// <summary>
	/// CV_NODE_IDX
	/// </summary>
	/// <param name="mat"></param>
	/// <param name="node"></param>
	/// <returns></returns>
	static IntPtr NODE_IDX(IntPtr mat, IntPtr node)
	{
		CvSparseMat* matPtr = (CvSparseMat*)mat.ToPointer();
		void* nodePtr = node.ToPointer();
		return IntPtr(CV_NODE_IDX(matPtr, nodePtr));
	}

	/// <summary>
	/// </summary>
	static bool IS_HIST(IntPtr hist)
	{
		CvHistogram* ptr = (CvHistogram*)hist.ToPointer();
		return CV_IS_HIST(ptr);
	}
	/// <summary>
	/// CV_IS_UNIFORM_HIST
	/// </summary>
	static bool IS_UNIFORM_HIST(IntPtr hist)
	{
		CvHistogram* ptr = (CvHistogram*)hist.ToPointer();
		return CV_IS_UNIFORM_HIST(ptr);
	}
	/// <summary>
	/// CV_IS_SPARSE_HIST
	/// </summary>
	static bool IS_SPARSE_HIST(IntPtr hist)
	{
		CvHistogram* ptr = (CvHistogram*)hist.ToPointer();
		return CV_IS_SPARSE_HIST(ptr);
	}
	/// <summary>
	/// CV_HIST_HAS_RANGES
	/// </summary>
	static bool HIST_HAS_RANGES(IntPtr hist)
	{
		CvHistogram* ptr = (CvHistogram*)hist.ToPointer();
		return CV_HIST_HAS_RANGES(ptr);
	}
	/// <summary>
	/// </summary>
	static bool IS_STORAGE(IntPtr storage)
	{
		void* ptr = storage.ToPointer();
		return CV_IS_STORAGE(ptr);
	}
	/// <summary>
	/// Checks whether the element pointed by ptr belongs to a set or not
	/// </summary>
	static bool IS_SET_ELEM(IntPtr ptr)
	{
		void* p = ptr.ToPointer();
		return CV_IS_SET_ELEM(p);
	}
	/// <summary>
	/// CV_IS_SEQ
	/// </summary>
	static bool IS_SEQ(IntPtr seq)
	{
		void* ptr = seq.ToPointer();
		return CV_IS_SEQ(ptr);
	}
	/// <summary>
	/// CV_IS_SET
	/// </summary>
	static bool IS_SET(IntPtr seq)
	{
		void* ptr = seq.ToPointer();
		return CV_IS_SET(ptr);
	}
	/// <summary>
	/// CV_SEQ_ELTYPE
	/// </summary>
	static SeqFlag SEQ_ELTYPE(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return (SeqFlag)CV_SEQ_ELTYPE(ptr);
	}
	/// <summary>
	/// CV_SEQ_KIND
	/// </summary>
	static SeqFlag SEQ_KIND(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return (SeqFlag)CV_SEQ_KIND(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_INDEX
	/// </summary>
	static bool IS_SEQ_INDEX(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_INDEX(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CURVE
	/// </summary>
	static bool IS_SEQ_CURVE(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_CURVE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CLOSED
	/// </summary>
	static bool IS_SEQ_CLOSED(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_CLOSED(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CONVEX
	/// </summary>
	static bool IS_SEQ_CONVEX(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_CONVEX(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_HOLE
	/// </summary>
	static bool IS_SEQ_HOLE(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_HOLE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_SIMPLE
	/// </summary>
	static bool IS_SEQ_SIMPLE(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_SIMPLE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POINT_SET
	/// </summary>
	static bool IS_SEQ_POINT_SET(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_POINT_SET(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POINT_SUBSET
	/// </summary>
	static bool IS_SEQ_POINT_SUBSET(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_POINT_SUBSET(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POLYLINE
	/// </summary>
	static bool IS_SEQ_POLYLINE(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_POLYLINE(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POLYGON
	/// </summary>
	static bool IS_SEQ_POLYGON(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_POLYGON(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CHAIN
	/// </summary>
	static bool IS_SEQ_CHAIN(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_CHAIN(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CONTOUR
	/// </summary>
	static bool IS_SEQ_CONTOUR(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_CONTOUR(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_CHAIN_CONTOUR
	/// </summary>
	static bool IS_SEQ_CHAIN_CONTOUR(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_CHAIN_CONTOUR(ptr);
	}
	/// <summary>
	/// CV_IS_SEQ_POLYGON_TREE
	/// </summary>
	static bool IS_SEQ_POLYGON_TREE(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SEQ_POLYGON_TREE(ptr);
	}
	/// <summary>
	/// CV_IS_GRAPH
	/// </summary>
	static bool IS_GRAPH(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_GRAPH(ptr);
	}
	/// <summary>
	/// CV_IS_GRAPH_ORIENTED
	/// </summary>
	static bool IS_GRAPH_ORIENTED(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_GRAPH_ORIENTED(ptr);
	}
	/// <summary>
	/// CV_IS_SUBDIV2D
	/// </summary>
	static bool IS_SUBDIV2D(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_IS_SUBDIV2D(ptr);
	}
	///// <summary>
	///// CV_SEQ_ELEM
	///// </summary>
	///// <typeparam name="TElemType"></typeparam>
	///// <param name="seq"></param>
	///// <param name="index"></param>
	///// <returns></returns>
	//static IntPtr CV_SEQ_ELEM<TElemType>(IntPtr seq, int index)
	//{
	//	throw new NotSupportedException();
	//	/* assert gives some guarantee that <seq> parameter is valid */
	//	// (   assert(sizeof((seq)->first[0]) == sizeof(CvSeqBlock) &&      
	//	// (seq)->elem_size == sizeof(elem_type)),                      
	//	// (elem_type*)((seq)->first && (unsigned)index <               
	//	// (unsigned)((seq)->first->count) ?                            
	//	// (seq)->first->data + (index) * sizeof(elem_type) :           
	//	// cvGetSeqElem( (CvSeq*)(seq), (index) )))

	//}
	///// <summary>
	///// CV_GET_SEQ_ELEM
	///// </summary>
	///// <typeparam name="TElemType"></typeparam>
	///// <param name="seq"></param>
	///// <param name="index"></param>
	///// <returns></returns>

	//static IntPtr CV_GET_SEQ_ELEM<TElemType>(IntPtr seq, int index)
	//{
	//	return CV_SEQ_ELEM<TElemType>(seq, index);
	//}
	/// <summary>
	/// Add element to sequence
	/// </summary>
	/// <param name="elem_ptr"></param>
	/// <param name="writer"></param>
	static void WRITE_SEQ_ELEM_VAR(IntPtr elem_ptr, IntPtr writer)
	{
		CvSeqWriter& writerRef = *(CvSeqWriter*)writer.ToPointer();
		void* elemPtr = elem_ptr.ToPointer();
		CV_WRITE_SEQ_ELEM_VAR(elemPtr, writerRef);
	}
	///// <summary>
	///// CV_WRITE_SEQ_ELEM
	///// </summary>
	///// <param name="elem"></param>
	///// <param name="writer"></param>
	//static void CV_WRITE_SEQ_ELEM<TElement>(IntPtr elem, IntPtr writer)
	//{
	//	throw new NotSupportedException();
	//	// assert( (writer).seq->elem_size == sizeof(elem)); 
	//	// if( (writer).ptr >= (writer).block_max )          
	//	// {                                                 
	//	//     cvCreateSeqBlock( &writer);                   
	//	// }                                                 
	//	// assert( (writer).ptr <= (writer).block_max - sizeof(elem));
	//	// memcpy((writer).ptr, &(elem), sizeof(elem));      
	//	// (writer).ptr += sizeof(elem);                     
	//}

	/// <summary>
	/// Move reader position forward
	/// </summary>
	/// <param name="elem_size"></param>
	/// <param name="reader"></param>
	static void NEXT_SEQ_ELEM(int elem_size, IntPtr reader)
	{
		CvSeqReader& readerRef = *(CvSeqReader*)reader.ToPointer();
		CV_NEXT_SEQ_ELEM(elem_size, readerRef);
	}

	/// <summary>
	/// Move reader position backward
	/// </summary>
	/// <param name="elem_size"></param>
	/// <param name="reader"></param>
	static void PREV_SEQ_ELEM(int elem_size, IntPtr reader)
	{
		CvSeqReader& readerRef = *(CvSeqReader*)reader.ToPointer();
		CV_PREV_SEQ_ELEM(elem_size, readerRef);
	}
	///// <summary>
	///// Read element and move read position forward
	///// </summary>
	///// <param name="elem"></param>
	///// <param name="reader"></param>
	//static void CV_READ_SEQ_ELEM<T>(T& elem, IntPtr reader)
	//{
	//	CvSeqReader& readerRef = *(CvSeqReader*)reader.ToPointer();
	//	CV_READ_SEQ_ELEM(elem_size, readerRef);
	//	throw new NotSupportedException();
	//	// assert( (reader).seq->elem_size == sizeof(elem));          
	//	// memcpy( &(elem), (reader).ptr, sizeof((elem)));            
	//	// CV_NEXT_SEQ_ELEM( sizeof(elem), reader )                   
	//}
	///// <summary>
	///// Read element and move read position backward
	///// </summary>
	///// <param name="elem"></param>
	///// <param name="reader"></param>
	//static void CV_REV_READ_SEQ_ELEM<T>(T& elem, IntPtr reader)
	//{
	//	throw new NotSupportedException();
	//	// assert( (reader).seq->elem_size == sizeof(elem));            
	//	// memcpy(&(elem), (reader).ptr, sizeof((elem)));               
	//	// CV_PREV_SEQ_ELEM( sizeof(elem), reader )                     
	//}

	///// <summary>
	///// CV_READ_CHAIN_POINT
	///// </summary>
	///// <param name="_pt"></param>
	///// <param name="reader"></param>
	//static void READ_CHAIN_POINT(Point2D32s& _pt, IntPtr reader)
	//{
	//  Bug in openCV !!!
	//	CvSeqReader& readerRef = *(CvSeqReader*)reader.ToPointer();
	//	CvPoint pt;
	//	CV_READ_CHAIN_POINT(pt, readerRef);
	//	_pt.X = pt.x;
	//	_pt.Y = pt.y;
	//}

	/// <summary>
	/// CV_CURRENT_POINT
	/// </summary>
	/// <param name="reader"></param>
	/// <returns></returns>
	static Point2D32s CURRENT_POINT(IntPtr reader)
	{
		CvSeqReader& readerRef = *(CvSeqReader*)reader.ToPointer();
		CvPoint pt = CV_CURRENT_POINT(readerRef);
		return Point2D32s(pt.x, pt.y);
	}
	/// <summary>
	/// CV_PREV_POINT
	/// </summary>
	/// <param name="reader"></param>
	/// <returns></returns>
	static Point2D32s PREV_POINT(IntPtr reader)
	{
		CvSeqReader& readerRef = *(CvSeqReader*)reader.ToPointer();
		CvPoint pt = CV_PREV_POINT(readerRef);
		return Point2D32s(pt.x, pt.y);
	}
	/// <summary>
	/// CV_READ_EDGE
	/// </summary>
	/// <param name="pt1"></param>
	/// <param name="pt2"></param>
	/// <param name="reader"></param>
	static void READ_EDGE(Point2D32s& pt1, Point2D32s& pt2, IntPtr reader)
	{
		CvSeqReader& readerRef = *(CvSeqReader*)reader.ToPointer();
		CvPoint cvpt1, cvpt2;
		CV_READ_EDGE(cvpt1, cvpt2, readerRef);
		pt1.X = cvpt1.x;
		pt1.Y = cvpt1.y;
		pt2.X = cvpt2.x;
		pt2.Y = cvpt2.y;
	}
	/// <summary>
	/// Return next graph edge for given vertex
	/// </summary>
	/// <param name="edge"></param>
	/// <param name="vertex"></param>
	static void NEXT_GRAPH_EDGE(IntPtr edge, IntPtr vertex)
	{
		CvGraphEdge* edgePtr = (CvGraphEdge*)edge.ToPointer();
		CvGraphVtx* vertexPtr = (CvGraphVtx*)vertex.ToPointer();
		CV_NEXT_GRAPH_EDGE(edgePtr, vertexPtr);
	}

	/// <summary>
	/// CV_NODE_TYPE
	/// </summary>
	static FileNodeFlag NODE_TYPE(FileNodeFlag flags)
	{
		return (FileNodeFlag)CV_NODE_TYPE((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_INT
	/// </summary>
	static bool NODE_IS_INT(FileNodeFlag flags)
	{
		return CV_NODE_IS_INT((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_REAL
	/// </summary>
	static bool NODE_IS_REAL(FileNodeFlag flags)
	{
		return CV_NODE_IS_REAL((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_STRING
	/// </summary>
	static bool NODE_IS_STRING(FileNodeFlag flags)
	{
		return CV_NODE_IS_STRING((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_SEQ
	/// </summary>
	static bool NODE_IS_SEQ(FileNodeFlag flags)
	{
		return CV_NODE_IS_SEQ((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_MAP
	/// </summary>
	static bool NODE_IS_MAP(FileNodeFlag flags)
	{
		return CV_NODE_IS_MAP((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_COLLECTION
	/// </summary>
	static bool NODE_IS_COLLECTION(FileNodeFlag flags)
	{
		return CV_NODE_IS_COLLECTION((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_FLOW
	/// </summary>
	static bool NODE_IS_FLOW(FileNodeFlag flags)
	{
		return CV_NODE_IS_FLOW((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_EMPTY
	/// </summary>
	static bool NODE_IS_EMPTY(FileNodeFlag flags)
	{
		return CV_NODE_IS_EMPTY((int)flags);
	}

	/// <summary>
	/// CV_NODE_IS_USER
	/// </summary>
	static bool NODE_IS_USER(FileNodeFlag flags)
	{
		return CV_NODE_IS_USER((int)flags);
	}

	/// <summary>
	/// CV_NODE_HAS_NAME
	/// </summary>
	static bool NODE_HAS_NAME(FileNodeFlag flags)
	{
		return CV_NODE_HAS_NAME((int)flags);
	}

	/// <summary>
	/// CV_NODE_SEQ_IS_SIMPLE
	/// </summary>
	static bool NODE_SEQ_IS_SIMPLE(IntPtr seq)
	{
		CvSeq* ptr = (CvSeq*)seq.ToPointer();
		return CV_NODE_SEQ_IS_SIMPLE(ptr);
	}
//////////////////////////////////////////////////////////////////////////